package com.zjl.core.controller;

import com.zjl.common.UrlContent;
import com.zjl.core.entity.BaseUserWithBLOBs;
import com.zjl.core.service.BaseUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author : zhangjl
 * @Description :
 * @Created : 2018-05-30 15:33
 **/
@Slf4j
@RequestMapping(UrlContent.BASEURL)
public class BaseUserController {

    @Autowired
    private BaseUserService baseUserService;

    @RequestMapping(UrlContent.USER_SAVE)
    @ResponseBody
    public Integer saveUser(@RequestBody BaseUserWithBLOBs user){
        log.info("save user");
        Integer result = baseUserService.save(user);
        log.info("result,{}", result);
        return result;
    }
}
